/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-09-05     RT-Thread    first version
 */

#include <rtthread.h>
#include <board.h>
#include <rtdevice.h>

#define LED0_PIN    GET_PIN(B, 5)
#define LED1_PIN    GET_PIN(E, 5)


#define DBG_TAG "main"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>

int App_Init_1(void)
{
    rt_thread_t tid;
    return 0;
}
INIT_EXPORT(App_Init_1, "a.1233455");

int App_Init_a(void)
{
    rt_thread_t tid;
    return 0;
}
INIT_APP_EXPORT(App_Init_a);

int App_Init_5(void)
{
    rt_thread_t tid;
    return 0;
}
INIT_BOARD_EXPORT(App_Init_5);

int App_Init_4(void)
{
    rt_thread_t tid;
    return 0;
}
INIT_BOARD_EXPORT(App_Init_4);

int App_Init_3(void)
{
    rt_thread_t tid;
    return 0;
}
INIT_BOARD_EXPORT(App_Init_3);

int main(void)
{
    int count = 1;
    rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
    rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT);

    while (count++)
    {
        // LOG_D("Hello RT-Thread!");
        rt_thread_mdelay(1000);

        rt_pin_write(LED0_PIN, PIN_LOW);
        rt_pin_write(LED1_PIN, PIN_LOW);
        rt_thread_mdelay(1000);

        rt_pin_write(LED0_PIN, PIN_HIGH);
        rt_pin_write(LED1_PIN, PIN_HIGH);
        rt_thread_mdelay(1000);

    }

    return RT_EOK;
}